#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
	
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	ll n,k,c;
	cin >> n >> k >> c;
	ll a[n];
	ll v[n];
	
	for (ll i=0;i<n;i++){
		cin >> a[i];
		v[i]=a[i]-c*(i);
	}
	
	sort(v,v+n);
	
	ll ans=0;
	for (int i=n-1;i>=n-k;i--){
		ans+=v[i]+(n-1-i)*c;
	}
	
	cout << ans;
}
